/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: tao
 * Date: 2023-11-06
 * Time: 9:36
 */
class Square {
    int x;//长
    int y;//宽
    public Square(int x, int y) {
        this.x = x;
        this.y = y;
    }
    public int are() {
        return this.x * this.y;
    }
}
class Oblong extends Square{

    int x;//长
    int y;//宽
    public Oblong(int x, int y) {
        super(x, y);
        this.x = x;
        this.y = y;
    }
    public int area() {
        //打印
        System.out.println("长方形的面积为:" + x * y);
        return x * y;
    }
}
public class Test {
    public static void main(String[] args) {
       Oblong oblong = new Oblong(2,3);
       oblong.area();
    }
}
